package org.dromara.finance.domain.bo;

import org.dromara.finance.domain.PurchaseContract;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 采购合同业务对象 purchase_contract
 *
 * @author xxy
 * @date 2025-08-18
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = PurchaseContract.class, reverseConvertGenerate = false)
public class PurchaseContractBo extends BaseEntity {

    /**
     * 主键
     */
    private Long id;

    /**
     * 关联销售合同号
     */
    @NotNull(message = "关联销售合同号不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long saleContractId;

    /**
     * 采购合同号
     */
    @NotBlank(message = "采购合同号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String purchaseContractNum;

    /**
     * 项目名称
     */
    @NotBlank(message = "项目名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String projectName;

    /**
     * 运输路段
     */
    @NotNull(message = "运输路段不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long transportSection;

    /**
     * 供应商
     */
    @NotNull(message = "供应商不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long supplierId;

    /**
     * 签订日期
     */
    @NotNull(message = "签订日期不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date signDate;

    /**
     * 签订部门
     */
    private Long signDept;

    /**
     * 签订员工
     */
    private Long signStaffId;

    /**
     * 原币价税合计
     */
    @NotNull(message = "原币价税合计不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal originalTotalAmount;

    /**
     * 原币无税金额
     */
    @NotNull(message = "原币无税金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal originalAmount;

    /**
     * 原币税额
     */
    @NotNull(message = "原币税额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal originalTaxedAmount;

    /**
     * 币种
     */
    @NotNull(message = "币种不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal currency;

    /**
     * 汇率
     */
    @NotNull(message = "汇率不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal exchangeRate;

    /**
     * 本币价税合计
     */
    @NotNull(message = "本币价税合计不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal localTotalAmount;

    /**
     * 本币无税金额
     */
    @NotNull(message = "本币无税金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal localAmount;

    /**
     * 本币税额
     */
    @NotNull(message = "本币税额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal localTaxedAmount;

    /**
     * 转关税
     */
    private BigDecimal transferTaxedAmount;

    /**
     * 保险费
     */
    private BigDecimal insuranceAmount;

    /**
     * 押车费
     */
    private BigDecimal escortAmount;

    /**
     * 备注
     */
    private String remark;


}
